Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build merkl airdrop csv based on user pool shares #1575

Merged
merged 26 commits into from
Feb 4, 2025

Conversation

gosuto-inzasheru
Copy link
Collaborator

closes #1563

@gosuto-inzasheru
Copy link
Collaborator Author

@Xeonus you mind giving some feedback on current state, maybe also run it locally?

i think the only thing that is really missing atm is epoch management, but it is maybe a bit too early to implement that already

@Xeonus
Copy link
Collaborator

Xeonus commented Jan 10, 2025

@gosuto-inzasheru initial thoughts / observations:

  1. could run locally successfully. Had to reconfigure web3 dependencies in my venv. might need to check if that is an issue for the action run too
  2. Make a more structured config file (similar to watchlist), so it is human readable and we easily see what we create airdrops for:
# Current
GAUGES = {
    "0x10A04efbA5B880e169920Fd4348527C64FB29d4D": "0x5bBaeD1fADC08C5fb3e4ae3C8848777E2dA77103",
    "0xc4Ce391d82D164c166dF9c8336DDF84206b2F812": "0x4B891340b51889f438a03DC0e8aAAFB0Bc89e7A6",
}

# Suggestion: 
GAUGE_CONFIG = {
    "pools": {
        "0x10A04...": {
            "gauge": "0x5bB...",
            "description": "Pool name/description"
        }
    }
}
  1. math checks out for weighted average. How many snapshots do we want to take? One per day might not be enough.

@gosuto-inzasheru
Copy link
Collaborator Author

@Xeonus this GAUGES dict is a quick fix for the fact that the gauges subgraph is currently not aware of v3 pools. once it is, we can simply retrieve the preferential gauge of the pool without any manual intervention, and thus the gauges dict will become obsolete

re: the amount of snapshot im not sure, it is actually quite fast right now for n=7. given we dont expect that many more pools, we could consider an hourly snapshot or something

Copy link
Contributor

github-actions bot commented Feb 3, 2025

FILENAME: MaxiOps/merkl/payloads/morpho-epoch_0.json
COMMIT: 9606694c706977ef03334a8b5135a32a1e5c0a1f

Validator Result
validate_contains_msig
validate_msig_in_address_book
validate_chain_specified

Copy link
Contributor

github-actions bot commented Feb 3, 2025

FILENAME: MaxiOps/merkl/payloads/morpho-epoch_0.json
MULTISIG: multisigs/maxi_omni (mainnet:0x9ff471F9f98F42E5151C7855fD1b5aa906b1AF7e)
COMMIT: 9606694c706977ef03334a8b5135a32a1e5c0a1f
CHAIN(S): mainnet
TENDERLY: 🟪 SKIPPED (Web3ValidationError("\nCould not identify the intended function with name createCampaign, positional arguments with type(s) ((str,address,address,int,int,int,int,str))and keyword arguments with type(s){}.\nFound 1 function(s) with the name createCampaign: ['createCampaign((bytes32,address,address,uint256,uint32,uint32,uint32,bytes))']\nFunction invocation failed due to no matching argument types."))

+------------------+-------------------------------------------------------------------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------+
| fx_name          | to                                                                      | value | inputs                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | bip_number | tx_index |
+------------------+-------------------------------------------------------------------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------+
| multicall        | 0x4095F064B8d3c3548A3bebfd0Bbfd04750E30077 (morpho/eth_bundler_v2)      | 0     | {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | N/A        |   N/A    |
|                  |                                                                         |       |   "data": [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |            |          |
|                  |                                                                         |       |     "0x6b89026a000000000000000000000000330eefa8a787552dc5cad3c3ca644844b1e61ddb0000000000000000000000009ff471f9f98f42e5151c7855fd1b5aa906b1af7e00000000000000000000000058d97b57bb95320f9a05dc918aef65434969c2b200000000000000000000000000000000000000000000004c748391b4a2e8d38100000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000eea2e120be5d26eee545e8535fccb5ea38f2340b502263927520adc30d7b9744d57e8ed75beee9c9ed92f47281a47b6efde7881ff35c39746de9b1b4b760457bd5cea201b922bdd85e98a7aa6e41bfa2b35490c4f35ac002acbc7611e499641fda1675d6f40dbacba5bd634b77d8c5350b935b121e8034ff94cd54cb560ea43574883beda04be8b8c91be901a111ee3bbeeca4b3e234e55b74fd15eb60be000bdc40443901247232d54e158ac337213593c694e01d512c50ac1825afd86c7a04f0ee6b3d000af89e2079c54e5392a4b2e9764a67280bf7723974d2aabcb6a234ed66388c926aeb083ef314a54d346a7fadf42fed4351d540d4a7e97bbd6105e69d8b447d2ade6278cf85592dbc41d1a08e1e968c287ffbc45dbc279a22fe6f5ef0f2f6320f481f1f7cce40bad9b86bea2f56ec5de68912646ee84d283f1f796826641b15795a0d6f5abd084a938f9bc02439d6c9e0e63e6a464c654719ea48e111e632b50acbdfd8e3b6d96b135812ff2643e67fe054b001c985e1687e7e5ce07f33bf03f812a39b88029cc602b6f3748abd014c5f06c6f76cd2b89d182188be0195d6d3e28c15340eea5a3e8cc70aff7dbfb39bc1ba5cc698e2577265875dbdb" |            |          |
|                  |                                                                         |       |   ]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |            |          |
|                  |                                                                         |       | }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |            |          |
| approve          | 0x58D97B57BB95320F9a05dC918Aef65434969c2B2 (tokens/MORPHO)              | 0     | {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | N/A        |   N/A    |
|                  |                                                                         |       |   "spender": [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |            |          |
|                  |                                                                         |       |     "0x8BB4C975Ff3c250e0ceEA271728547f3802B36Fd (angle/distribution_creator)"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |            |          |
|                  |                                                                         |       |   ],                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |            |          |
|                  |                                                                         |       |   "amount": [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |            |          |
|                  |                                                                         |       |     "raw:1410348263937287721964, 18 decimals:1410.348263937287721964, 6 decimals: 1410348263937287.721964"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |            |          |
|                  |                                                                         |       |   ]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |            |          |
|                  |                                                                         |       | }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |            |          |
| acceptConditions | 0x8BB4C975Ff3c250e0ceEA271728547f3802B36Fd (angle/distribution_creator) | 0     | "N/A"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            | N/A        |   N/A    |
| createCampaign   | 0x8BB4C975Ff3c250e0ceEA271728547f3802B36Fd (angle/distribution_creator) | 0     | {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | N/A        |   N/A    |
|                  |                                                                         |       |   "newCampaign": [                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |            |          |
|                  |                                                                         |       |     "\"0x0000000000000000000000000000000000000000000000000000000000000000\"",                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |            |          |
|                  |                                                                         |       |     "\"0x0000000000000000000000000000000000000000\"",                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |            |          |
|                  |                                                                         |       |     "\"0x58D97B57BB95320F9a05dC918Aef65434969c2B2\"",                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |            |          |
|                  |                                                                         |       |     "\"1410348263937287721964\"",                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |            |          |
|                  |                                                                         |       |     "4",                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |            |          |
|                  |                                                                         |       |     "1738594800",                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |            |          |
|                  |                                                                         |       |     "3600",                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |            |          |
|                  |                                                                         |       |     "\"0x0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000005568747470733a2f2f616e676c652d626c6f672e696e667572612d697066732e696f2f697066732f516d527538616f33535a41524a6d6e654e7a39467172334535536667777a41313759315534324579447962585047000000000000000000000000000000000000000000000000000000000000000000000000000000000000166373555344432d6373555344543a3a65706f63685f300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\""                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |            |          |
|                  |                                                                         |       |   ]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |            |          |
|                  |                                                                         |       | }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |            |          |
+------------------+-------------------------------------------------------------------------+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------+----------+

@gosuto-inzasheru
Copy link
Collaborator Author

@Xeonus this is good to go imo

could rerun report here with proper address labels after BalancerMaxis/bal_addresses#594 has been merged

@gosuto-inzasheru gosuto-inzasheru marked this pull request as ready for review February 3, 2025 15:32
Copy link
Collaborator

@Xeonus Xeonus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good now. Thanks for all the changes

@gosuto-inzasheru gosuto-inzasheru merged commit c382647 into main Feb 4, 2025
2 checks passed
@gosuto-inzasheru gosuto-inzasheru deleted the issue/1563 branch February 4, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retroactive Morpho reward Distribution automation
2 participants